home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 7 / 64er_Magazin_Sonderheft_07_86-07_1986_Markt__Technik_de_Side_A.d64 / uhrzeit anzeigen (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  351b  |  14 lines

  1. 300 rem echtzeituhr lesen
  2. 310 cia=56328:rem anfangsadresse von cia 1
  3. 320 hh=peek(cia+3):zs=peek(cia)
  4. 330 mm=peek(cia+2)
  5. 340 ss=peek(cia+1)
  6. 350 tm=0: if hh>128 then tm=1:hh=hh-128:rem nachmittags
  7. 360 hh=int(hh/16)*10+(hh and 15)
  8. 370 if tm=1 and hh<>12 then hh=hh+12
  9. 375 if tm=0 and hh=12 then hh=0
  10. 380 mm=int(mm/16)*10+(mm and 15)
  11. 390 ss=int(ss/16)*10+(ss and 15)
  12. 400 print"[147]"hh":"mm":"ss
  13. 410 goto320
  14.